#!/bin/bash
# $Id$

. /etc/scripts/env
. /etc/scripts/utils.fn
. /nemonico/BOOT

echo $$ > /tmp/getpassword_console.sh.pid

count=0
pass1="0"
while [ "$pass1" != "$pass2" ]; do

				if [ "$count" = "3" ]; then
								echo "Reboot ..."
								reboot
				fi

				if [ "$count" != "0" ]; then
								echo "Passphrase do not match!"
				fi

				echo -n " Enter passphrase for the vault: "
				read -s pass1
				echo ""
				echo -n " Repeat: "
				read -s pass2
				echo ""
				count=$(($count+1))
done
echo $pass2 > $vp_pass

# vim: ts=2 syn=sh
# getpassword_console.sh: end
